package wps.component.elementsetting {
import mx.events.FlexEvent;

import spark.components.Group;

import wps.component.DrawingBoard;
import wps.util.Register;

public class SettingBase extends Group {

    //--------------------------------------------------------------------------
    //
    // Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    // drawingboard
    //----------------------------------

    private var _board:DrawingBoard;

    [Bindable]
    public function get board():DrawingBoard {
        return _board;
    }

    public function set board(board:DrawingBoard):void {
        _board = board;
    }

    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    public function SettingBase() {
        super();

        addEventListener(FlexEvent.INITIALIZE, initializeHandler);
    }

    //--------------------------------------------------------------------------
    //
    // Event handlers
    //
    //--------------------------------------------------------------------------

    protected function initializeHandler(e:FlexEvent):void {
        board = Register.lookup(DrawingBoard.NAME) as DrawingBoard;
    }

}
}
